The invention concerns an apparatus and a method for providing decoded information and especially an apparatus having a cache for storing and providing decoded information to an information recipient.
As used herein, the word xe2x80x9cinformationxe2x80x9d is intended to include any type of data or instructions or both. As used herein, the words encode, encrypt, encipher, compressed and the words decode, decrypt, decipher and decompress, and related is forms, are intended to include any form of coding for any purpose, including, but not limited to obscuring meaning, compaction or compression to occupy less space or transmission time, or any other information technique. The words encode, encipher, encrypt, compress are intended to have the same meaning, and likewise for their inverse forms, e.g., decode, decipher, decrypt and decompress. For convenience of explanation, and without limiting the meaning of the terms xe2x80x9cinformationxe2x80x9d and xe2x80x9ccodedxe2x80x9d as set above, the terms xe2x80x9cinstructionxe2x80x9d and xe2x80x9ccodedxe2x80x9d are used in the pages below.
There is a need to store instructions in coded form. This can arise because of a desire to make the instructions opaque to unintended users or to conserve memory space through some means of redundancy elimination or compaction coding or for other reason.
Storing instructions in coded form causes several problems, among which is the need to decode the instruction that is retrieved from the memory. When coded instruction must be refetched there is a need to decode it again, thereby causing a waste of time and degradation of apparatus performances.
In many computer apparatuses, these problems are more acute when a change of flow occurs. When a change of flow occurs instruction has to be fetched from the memory and decoded before being provided to a CPU of the computer apparatus.
A change of flow can occur for various reasons, such as an execution of an instruction that involves conditional or unconditional branching. A branch target instruction is the instruction that is fetched by the CPU when executing a branch instruction. The address of the branch target instruction is known as xe2x80x98branch target addressxe2x80x99 and is a part of any branch instruction. In some instructions, such as the Isync instruction of the PowerPC microprocessor, the branch target address is predetermined, it is driven from the opcode alone.
This problem also arises when a branch prediction is erroneous. In such a case there is a need to refetch the instruction that follow the branch instruction.
The mentioned above waste of time and degradation of apparatus performances are especially acute in computer apparatuses that are supposed to handle very frequent changes of flow.
Another problem related to the storage of instructions in coded form is that the length of the instructions vary in a manner that the coded instructions are not aligned. Furthermore, a single coded instruction can be stored in a portion of a memory word or even in more than a single memory word.
There is a need to allow frequent changes of flow with minimum penalty. There is an ongoing need for improved computers and computer memory organization and operating methods which reduce or eliminate these and other well known limitations of the prior art.